<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>react中使用内联样式</title>
</head>
<body>
	<div id="container"></div>
</body>
<script src="./libs/16.2.0/react.js"></script>
<script src="./libs/16.2.0/react-dom.js"></script>
<!-- 必须引入babel，否则无法解析jsx语法 -->
<script src="./libs/16.2.0/babel.js"></script>
<script type="text/babel">
	var divStyle={
		color:'#333',
		background:'lightgreen',
		fontSize:12,
		padding:10
	}
	ReactDOM.render(
		<div style={divStyle}>我是一段文本</div>,
		document.getElementById('container')
	);
</script>
</html>